Left Termination of the query pattern p_in_2(g, a) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

p(X, X).
p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(Y))).

Queries:

p(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (b,f) (b,b) (f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

P_IN_GA(f(X), g(Y)) → U1_GA(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GA(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
P_IN_GG(f(X), g(Y)) → U1_GG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → U2_GG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_AG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → U2_AG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → U2_GA(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
P_IN_GG(x1, x2)  =  P_IN_GG(x1, x2)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U2_AG(x1, x2, x3, x4)  =  U2_AG(x4)
U1_AG(x1, x2, x3)  =  U1_AG(x3)
U2_GG(x1, x2, x3, x4)  =  U2_GG(x4)
U1_GA(x1, x2, x3)  =  U1_GA(x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_GA(f(X), g(Y)) → U1_GA(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GA(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
P_IN_GG(f(X), g(Y)) → U1_GG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → U2_GG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_AG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → U2_AG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → U2_GA(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
P_IN_GG(x1, x2)  =  P_IN_GG(x1, x2)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U2_AG(x1, x2, x3, x4)  =  U2_AG(x4)
U1_AG(x1, x2, x3)  =  U1_AG(x3)
U2_GG(x1, x2, x3, x4)  =  U2_GG(x4)
U1_GA(x1, x2, x3)  =  U1_GA(x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 1 SCC with 10 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
PiDP
              ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
PiDP
                  ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_gg(X, X) → p_out_gg(X, X)

The argument filtering Pi contains the following mapping:
f(x1)  =  f
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg
g(x1)  =  g
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
QDP
                      ↳ Rewriting
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_IN_AG(g) → U1_AG(p_in_gg(f, f))
U1_AG(p_out_gg) → P_IN_AG(g)

The TRS R consists of the following rules:

p_in_gg(X, X) → p_out_gg

The set Q consists of the following terms:

p_in_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule P_IN_AG(g) → U1_AG(p_in_gg(f, f)) at position [0] we obtained the following new rules:

P_IN_AG(g) → U1_AG(p_out_gg)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
                    ↳ QDP
                      ↳ Rewriting
QDP
                          ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_IN_AG(g) → U1_AG(p_out_gg)
U1_AG(p_out_gg) → P_IN_AG(g)

The TRS R consists of the following rules:

p_in_gg(X, X) → p_out_gg

The set Q consists of the following terms:

p_in_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
                    ↳ QDP
                      ↳ Rewriting
                        ↳ QDP
                          ↳ UsableRulesProof
QDP
                              ↳ QReductionProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_IN_AG(g) → U1_AG(p_out_gg)
U1_AG(p_out_gg) → P_IN_AG(g)

R is empty.
The set Q consists of the following terms:

p_in_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

p_in_gg(x0, x1)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
                    ↳ QDP
                      ↳ Rewriting
                        ↳ QDP
                          ↳ UsableRulesProof
                            ↳ QDP
                              ↳ QReductionProof
QDP
                                  ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_IN_AG(g) → U1_AG(p_out_gg)
U1_AG(p_out_gg) → P_IN_AG(g)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

P_IN_AG(g) → U1_AG(p_out_gg)
U1_AG(p_out_gg) → P_IN_AG(g)

The TRS R consists of the following rules:none


s = U1_AG(p_out_gg) evaluates to t =U1_AG(p_out_gg)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U1_AG(p_out_gg)P_IN_AG(g)
with rule U1_AG(p_out_gg) → P_IN_AG(g) at position [] and matcher [ ]

P_IN_AG(g)U1_AG(p_out_gg)
with rule P_IN_AG(g) → U1_AG(p_out_gg)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (b,f) (b,b) (f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg(x1, x2)
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1, x2)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg(x1, x2)
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1, x2)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

P_IN_GA(f(X), g(Y)) → U1_GA(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GA(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
P_IN_GG(f(X), g(Y)) → U1_GG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → U2_GG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_AG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → U2_AG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → U2_GA(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg(x1, x2)
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1, x2)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
P_IN_GG(x1, x2)  =  P_IN_GG(x1, x2)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U2_AG(x1, x2, x3, x4)  =  U2_AG(x4)
U1_AG(x1, x2, x3)  =  U1_AG(x3)
U2_GG(x1, x2, x3, x4)  =  U2_GG(x4)
U1_GA(x1, x2, x3)  =  U1_GA(x3)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_GA(f(X), g(Y)) → U1_GA(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GA(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
P_IN_GG(f(X), g(Y)) → U1_GG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_GG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → U2_GG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
P_IN_AG(f(X), g(Y)) → P_IN_GG(f(X), f(Z))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → U2_AG(X, Y, Z, p_in_ag(Z, g(Y)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → U2_GA(X, Y, Z, p_in_ag(Z, g(Y)))
U1_GA(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg(x1, x2)
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1, x2)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
P_IN_GG(x1, x2)  =  P_IN_GG(x1, x2)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
U2_AG(x1, x2, x3, x4)  =  U2_AG(x4)
U1_AG(x1, x2, x3)  =  U1_AG(x3)
U2_GG(x1, x2, x3, x4)  =  U2_GG(x4)
U1_GA(x1, x2, x3)  =  U1_GA(x3)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 1 SCC with 10 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
PiDP
              ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, X) → p_out_ga(X, X)
p_in_ga(f(X), g(Y)) → U1_ga(X, Y, p_in_gg(f(X), f(Z)))
p_in_gg(X, X) → p_out_gg(X, X)
p_in_gg(f(X), g(Y)) → U1_gg(X, Y, p_in_gg(f(X), f(Z)))
U1_gg(X, Y, p_out_gg(f(X), f(Z))) → U2_gg(X, Y, Z, p_in_ag(Z, g(Y)))
p_in_ag(X, X) → p_out_ag(X, X)
p_in_ag(f(X), g(Y)) → U1_ag(X, Y, p_in_gg(f(X), f(Z)))
U1_ag(X, Y, p_out_gg(f(X), f(Z))) → U2_ag(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ag(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ag(f(X), g(Y))
U2_gg(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_gg(f(X), g(Y))
U1_ga(X, Y, p_out_gg(f(X), f(Z))) → U2_ga(X, Y, Z, p_in_ag(Z, g(Y)))
U2_ga(X, Y, Z, p_out_ag(Z, g(Y))) → p_out_ga(f(X), g(Y))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x1, x2)
f(x1)  =  f
U1_ga(x1, x2, x3)  =  U1_ga(x3)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg(x1, x2)
g(x1)  =  g
U1_gg(x1, x2, x3)  =  U1_gg(x3)
U2_gg(x1, x2, x3, x4)  =  U2_gg(x4)
p_in_ag(x1, x2)  =  p_in_ag(x2)
p_out_ag(x1, x2)  =  p_out_ag(x1, x2)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
U2_ag(x1, x2, x3, x4)  =  U2_ag(x4)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
PiDP
                  ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_AG(f(X), g(Y)) → U1_AG(X, Y, p_in_gg(f(X), f(Z)))
U1_AG(X, Y, p_out_gg(f(X), f(Z))) → P_IN_AG(Z, g(Y))

The TRS R consists of the following rules:

p_in_gg(X, X) → p_out_gg(X, X)

The argument filtering Pi contains the following mapping:
f(x1)  =  f
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
p_out_gg(x1, x2)  =  p_out_gg(x1, x2)
g(x1)  =  g
P_IN_AG(x1, x2)  =  P_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
QDP
                      ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

U1_AG(p_out_gg(f, f)) → P_IN_AG(g)
P_IN_AG(g) → U1_AG(p_in_gg(f, f))

The TRS R consists of the following rules:

p_in_gg(X, X) → p_out_gg(X, X)

The set Q consists of the following terms:

p_in_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule P_IN_AG(g) → U1_AG(p_in_gg(f, f)) at position [0] we obtained the following new rules:

P_IN_AG(g) → U1_AG(p_out_gg(f, f))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
                    ↳ QDP
                      ↳ Rewriting
QDP
                          ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

U1_AG(p_out_gg(f, f)) → P_IN_AG(g)
P_IN_AG(g) → U1_AG(p_out_gg(f, f))

The TRS R consists of the following rules:

p_in_gg(X, X) → p_out_gg(X, X)

The set Q consists of the following terms:

p_in_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
                    ↳ QDP
                      ↳ Rewriting
                        ↳ QDP
                          ↳ UsableRulesProof
QDP
                              ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

U1_AG(p_out_gg(f, f)) → P_IN_AG(g)
P_IN_AG(g) → U1_AG(p_out_gg(f, f))

R is empty.
The set Q consists of the following terms:

p_in_gg(x0, x1)

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

p_in_gg(x0, x1)



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ PiDP
              ↳ UsableRulesProof
                ↳ PiDP
                  ↳ PiDPToQDPProof
                    ↳ QDP
                      ↳ Rewriting
                        ↳ QDP
                          ↳ UsableRulesProof
                            ↳ QDP
                              ↳ QReductionProof
QDP
                                  ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

U1_AG(p_out_gg(f, f)) → P_IN_AG(g)
P_IN_AG(g) → U1_AG(p_out_gg(f, f))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U1_AG(p_out_gg(f, f)) → P_IN_AG(g)
P_IN_AG(g) → U1_AG(p_out_gg(f, f))

The TRS R consists of the following rules:none


s = P_IN_AG(g) evaluates to t =P_IN_AG(g)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

P_IN_AG(g)U1_AG(p_out_gg(f, f))
with rule P_IN_AG(g) → U1_AG(p_out_gg(f, f)) at position [] and matcher [ ]

U1_AG(p_out_gg(f, f))P_IN_AG(g)
with rule U1_AG(p_out_gg(f, f)) → P_IN_AG(g)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.